﻿namespace AjLogo.Primitives
{
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    public class IsNumber : UnaryPrimitive
    {
        public override object Apply(BindingEnvironment environment, object value)
        {
            if (value is int) return true;
            if (value is short) return true;
            if (value is long) return true;
            if (value is double) return true;
            if (value is float) return true;
            if (value is uint) return true;
            if (value is ulong) return true;
            if (value is ushort) return true;

            return false;
        }
    }
}
